home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / asm / utils / crossword / includes / cwhelpcode.i < prev    next >
Encoding:
Text File  |  1980-01-04  |  1.4 KB  |  78 lines

  1.  
  2.  
  3. * Help Functions File. Contains code for all of the Help
  4. * Requester enactment.
  5.  
  6. * These two pieces of code are branched to by all callers with the
  7. * following data in the following registers:
  8.  
  9. * ptr to texts in A0
  10. * no of text lines in D0
  11.  
  12. * First code calls up an InfoRequester, second calls up a
  13. * QueryRequester & returns D0=0 if 'NO' gadget pressed, D0 = -1.W
  14. * if 'YES' gadget pressed (Z flag in CCR conditioned also).
  15.  
  16.  
  17. _PopUpIR        lea    IRT_1(pc),a1
  18.         move.l    a1,irt_itext(a6)
  19.         move.l    a0,irt_tlist(a6)
  20.         move.w    d0,irt_count(a6)
  21.         
  22.         bsr    LinkInfoText
  23.  
  24.         bsr    ShowInfoReq
  25.  
  26.         rts
  27.  
  28.  
  29. _PopUpQR        lea    QRT_1(pc),a1
  30.         move.l    a1,irt_itext(a6)
  31.         move.l    a0,irt_tlist(a6)
  32.         move.w    d0,irt_count(a6)
  33.         
  34.         bsr    LinkInfoText
  35.  
  36.         bsr    DoQueryReq
  37.  
  38.         btst    #6,applic_flag2(a6)    ;which gadget pressed?
  39.         sne    d0            ;d0=0 if NO pressed
  40.         ext.w    d0            ;else -1.W if YES
  41.  
  42.         rts
  43.  
  44.  
  45. * This lot attached to the scroll gadgets.
  46.  
  47.  
  48. SGHelp        btst    #1,applic_flag2(a6)    ;HELP on?
  49.         beq.s    SGH_Doit            ;Exit if so
  50.  
  51.         lea    Help_GG1(pc),a0
  52.         moveq    #7,d0
  53.         bra.s    _PopUpIR
  54.         moveq    #0,d0        ;prevent execution of function
  55.  
  56.         rts            ;and return
  57.  
  58. SGH_Doit        moveq    #-1,d0        ;allow execution if not
  59.         rts            ;HELP on.
  60.  
  61.  
  62. * This one attached to the Edit Switch.
  63.  
  64.  
  65. EdSwHelp        btst    #1,applic_flag2(a6)    ;HELP on?
  66.         beq.s    EdSwH_Doit        ;Exit if so
  67.  
  68.         lea    Help_EdSw(pc),a0
  69.  
  70.         moveq    #6,d0
  71.         bra.s    _PopUpIR            ;show help panel
  72.  
  73. EdSwH_Doit    moveq    #0,d0
  74.         rts
  75.  
  76.  
  77.  
  78.